{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "34b3b723-b743-4135-87ed-30484e45af35",
   "metadata": {},
   "source": [
    "https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix\n",
    "\n",
    "\n",
    "Runtime: 176 ms, faster than 68.32% of Python3 online submissions for Kth Smallest Element in a Sorted Matrix.\n",
    "Memory Usage: 20.2 MB, less than 48.54% of Python3 online submissions for Kth Smallest Element in a Sorted Matrix.\n",
    "\n",
    "\n",
    "\n",
    "```python\n",
    "class Solution:\n",
    "    def kthSmallest(self, matrix: List[List[int]], k: int) -> int:\n",
    "        #3:38\n",
    "        nums = []\n",
    "        for row in matrix:\n",
    "            for num in row:\n",
    "                nums.append(num)\n",
    "        nums.sort()\n",
    "        #print(nums)\n",
    "        return nums[k-1]\n",
    "        #3:39\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "16be73f1-bd68-44da-bac9-bd2922dc0288",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
